﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.IO;
using System.Drawing;

namespace Beeldbankmvc.Code
{
    public class ImageHelper
    {
        //Bitmap bytes have to be created using Image.Save()
        public static Image BytesToImg(byte[] bmpBytes)
        {
            MemoryStream ms = new MemoryStream(bmpBytes);
            Image img = Image.FromStream(ms);
            // Do NOT close the stream!

            return img;
        }
    }
}